<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //2.编写一个getArrMax()函数，利用该函数求数组[13,68,79,92,83]中的最大值
    function getArrMax(arr) {    
    let max = arr[0];  
    for (let i = 1; i < arr.length; i++) {  
        if (arr[i] > max) {  
            max = arr[i];  
        }  
    }  
    console.log("数组中的最大值是:",max);  
}  
arr = [13, 68, 79, 92, 83];  
max = getArrMax(arr);
</script>
</html>